+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
+1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
+
+ * {gdk,gtk}/*.c: Make read-only data structures "static const" to
+ allow them to be shared, mainly including (but not limited to) the
+ GtkTypeInfo structures for each class.
+
+ * gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
+
Mon Nov 30 12:17:10 1998 Jeff Garzik <jgarzik@pobox.com>
* gtk/gtknotebook.c (gtk_notebook_reorder_child):
static gint autorepeat;
#ifdef G_ENABLE_DEBUG
-static GDebugKey gdk_debug_keys[] = {
+static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
guint32 time)
{
/* From gdkwindow.c */
- extern int nevent_masks;
- extern int event_mask_table[];
+ extern const int nevent_masks;
+ extern const int event_mask_table[];
gint return_val;
GdkWindowPrivate *window_private;
/* Incorporate the specific routines depending on compilation options */
-static GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
+static const GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
-static GdkDeviceInfo gdk_input_core_info =
+static const GdkDeviceInfo gdk_input_core_info =
{
GDK_CORE_POINTER,
"Core Pointer",
static gboolean
gdk_rgb_do_colormaps (void)
{
- const gint sizes[][3] = {
+ static const gint sizes[][3] = {
/* { 6, 7, 6 }, */
{ 6, 6, 6 },
{ 6, 6, 5 },
{ 3, 3, 3 },
{ 2, 2, 2 }
};
- const gint n_sizes = sizeof(sizes) / (3 * sizeof(gint));
+ static const gint n_sizes = sizeof(sizes) / (3 * sizeof(gint));
gint i;
for (i = 0; i < n_sizes; i++)
gdk_rgb_score_visual (GdkVisual *visual)
{
guint32 quality, speed, sys, pseudo;
- gchar* visual_names[] =
+ static const gchar* visual_names[] =
{
"static gray",
"grayscale",
gdk_rgb_init (void)
{
gint i;
- gint byte_order[1] = { 1 };
+ static const gint byte_order[1] = { 1 };
/* check endian sanity */
#if G_BYTE_ORDER == G_BIG_ENDIAN
#define DM_WIDTH 8
#define DM_WIDTH_SHIFT 3
#define DM_HEIGHT 8
-static guchar DM[8][8] =
+static const guchar DM[8][8] =
{
{ 0, 32, 8, 40, 2, 34, 10, 42 },
{ 48, 16, 56, 24, 50, 18, 58, 26 },
#ifdef G_ENABLE_DEBUG
-static gchar* visual_names[] =
+static const gchar* visual_names[] =
{
"static gray",
"grayscale",
void
gdk_visual_init (void)
{
- static gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
- static GdkVisualType possible_types[6] =
+ static const gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
+ static const GdkVisualType possible_types[6] =
{
GDK_VISUAL_DIRECT_COLOR,
GDK_VISUAL_TRUE_COLOR,
GDK_VISUAL_STATIC_GRAY
};
- static gint npossible_depths = 7;
- static gint npossible_types = 6;
+ static const gint npossible_depths = sizeof(possible_depths)/sizeof(gint);
+ static const gint npossible_types = sizeof(possible_types)/sizeof(GdkVisualType);
XVisualInfo *visual_list;
XVisualInfo visual_template;
#include <X11/extensions/shape.h>
#endif
-int nevent_masks = 20;
-int event_mask_table[20] =
+const int event_mask_table[20] =
{
ExposureMask,
PointerMotionMask,
0, /* PROXIMTY_OUT */
SubstructureNotifyMask
};
+const int nevent_masks = sizeof(event_mask_table)/sizeof(int);
static gboolean gdk_window_have_shape_ext (void);
/* Incorporate the specific routines depending on compilation options */
-static GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
+static const GdkAxisUse gdk_input_core_axes[] = { GDK_AXIS_X, GDK_AXIS_Y };
-static GdkDeviceInfo gdk_input_core_info =
+static const GdkDeviceInfo gdk_input_core_info =
{
GDK_CORE_POINTER,
"Core Pointer",
static gint autorepeat;
#ifdef G_ENABLE_DEBUG
-static GDebugKey gdk_debug_keys[] = {
+static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
guint32 time)
{
/* From gdkwindow.c */
- extern int nevent_masks;
- extern int event_mask_table[];
+ extern const int nevent_masks;
+ extern const int event_mask_table[];
gint return_val;
GdkWindowPrivate *window_private;
#ifdef G_ENABLE_DEBUG
-static gchar* visual_names[] =
+static const gchar* visual_names[] =
{
"static gray",
"grayscale",
void
gdk_visual_init (void)
{
- static gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
- static GdkVisualType possible_types[6] =
+ static const gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
+ static const GdkVisualType possible_types[6] =
{
GDK_VISUAL_DIRECT_COLOR,
GDK_VISUAL_TRUE_COLOR,
GDK_VISUAL_STATIC_GRAY
};
- static gint npossible_depths = 7;
- static gint npossible_types = 6;
+ static const gint npossible_depths = sizeof(possible_depths)/sizeof(gint);
+ static const gint npossible_types = sizeof(possible_types)/sizeof(GdkVisualType);
XVisualInfo *visual_list;
XVisualInfo visual_template;
#include <X11/extensions/shape.h>
#endif
-int nevent_masks = 20;
-int event_mask_table[20] =
+const int event_mask_table[20] =
{
ExposureMask,
PointerMotionMask,
0, /* PROXIMTY_OUT */
SubstructureNotifyMask
};
+const int nevent_masks = sizeof(event_mask_table)/sizeof(int);
static gboolean gdk_window_have_shape_ext (void);
gtk_accelerator_valid (guint keyval,
GdkModifierType modifiers)
{
- guint invalid_accelerator_vals[] = {
+ static const guint invalid_accelerator_vals[] = {
GDK_BackSpace, GDK_Delete, GDK_KP_Delete,
GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock,
GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R,
}
else if (len >= 6 && is_modx (accelerator))
{
- guint mod_vals[] = {
+ static const guint mod_vals[] = {
GDK_MOD1_MASK, GDK_MOD2_MASK, GDK_MOD3_MASK,
GDK_MOD4_MASK, GDK_MOD5_MASK
};
if (!accel_label_type)
{
- GtkTypeInfo accel_label_info =
+ static const GtkTypeInfo accel_label_info =
{
"GtkAccelLabel",
sizeof (GtkAccelLabel),
if (!adjustment_type)
{
- GtkTypeInfo adjustment_info =
+ static const GtkTypeInfo adjustment_info =
{
"GtkAdjustment",
sizeof (GtkAdjustment),
if (!alignment_type)
{
- GtkTypeInfo alignment_info =
+ static const GtkTypeInfo alignment_info =
{
"GtkAlignment",
sizeof (GtkAlignment),
if (!arrow_type)
{
- GtkTypeInfo arrow_info =
+ static const GtkTypeInfo arrow_info =
{
"GtkArrow",
sizeof (GtkArrow),
if (!aspect_frame_type)
{
- GtkTypeInfo aspect_frame_info =
+ static const GtkTypeInfo aspect_frame_info =
{
"GtkAspectFrame",
sizeof (GtkAspectFrame),
if (!button_box_type)
{
- GtkTypeInfo button_box_info =
+ static const GtkTypeInfo button_box_info =
{
"GtkButtonBox",
sizeof (GtkButtonBox),
if (!bin_type)
{
- GtkTypeInfo bin_info =
+ static const GtkTypeInfo bin_info =
{
"GtkBin",
sizeof (GtkBin),
if (!box_type)
{
- GtkTypeInfo box_info =
+ static const GtkTypeInfo box_info =
{
"GtkBox",
sizeof (GtkBox),
if (!button_type)
{
- GtkTypeInfo button_info =
+ static const GtkTypeInfo button_info =
{
"GtkButton",
sizeof (GtkButton),
#define and && /* logical (boolean) operators: lower case */
#define or ||
-static N_int month_length[2][13] =
+static const N_int month_length[2][13] =
{
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
-static N_int days_in_months[2][14] =
+static const N_int days_in_months[2][14] =
{
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
if (!calendar_type)
{
- GtkTypeInfo calendar_info =
+ static const GtkTypeInfo calendar_info =
{
"GtkCalendar",
sizeof (GtkCalendar),
if (!check_button_type)
{
- GtkTypeInfo check_button_info =
+ static const GtkTypeInfo check_button_info =
{
"GtkCheckButton",
sizeof (GtkCheckButton),
if (!check_menu_item_type)
{
- GtkTypeInfo check_menu_item_info =
+ static const GtkTypeInfo check_menu_item_info =
{
"GtkCheckMenuItem",
sizeof (GtkCheckMenuItem),
if (!clist_type)
{
- GtkTypeInfo clist_info =
+ static const GtkTypeInfo clist_info =
{
"GtkCList",
sizeof (GtkCList),
#define SF GtkSignalFunc
-scale_val_type scale_vals[NUM_CHANNELS] =
+static const scale_val_type scale_vals[NUM_CHANNELS] =
{
{"Hue:", 0.0, 360.0, 1.00, 10.00, (SF) gtk_color_selection_hsv_updater},
{"Saturation:", 0.0, 1.0, 0.01, 0.01, (SF) gtk_color_selection_hsv_updater},
if (!color_selection_type)
{
- GtkTypeInfo colorsel_info =
+ static const GtkTypeInfo colorsel_info =
{
"GtkColorSelection",
sizeof (GtkColorSelection),
{
GtkColorSelection *colorsel;
- GtkTargetEntry targets[] = {
+ static const GtkTargetEntry targets[] = {
{ "application/x-color", 0 }
};
if (!combo_type)
{
- GtkTypeInfo combo_info =
+ static const GtkTypeInfo combo_info =
{
"GtkCombo",
sizeof (GtkCombo),
if (!container_type)
{
- GtkTypeInfo container_info =
+ static const GtkTypeInfo container_info =
{
"GtkContainer",
sizeof (GtkContainer),
if (!ctree_type)
{
- GtkTypeInfo ctree_info =
+ static const GtkTypeInfo ctree_info =
{
"GtkCTree",
sizeof (GtkCTree),
if (!curve_type)
{
- GtkTypeInfo curve_info =
+ static const GtkTypeInfo curve_info =
{
"GtkCurve",
sizeof (GtkCurve),
if (!data_type)
{
- GtkTypeInfo data_info =
+ static const GtkTypeInfo data_info =
{
"GtkData",
sizeof (GtkData),
if (!dialog_type)
{
- GtkTypeInfo dialog_info =
+ static const GtkTypeInfo dialog_info =
{
"GtkDialog",
sizeof (GtkDialog),
{ 0 , action_none_bits, action_none_mask_bits, NULL },
};
-static gint n_drag_cursors = sizeof(drag_cursors) / sizeof(drag_cursors[0]);
+static const gint n_drag_cursors = sizeof(drag_cursors) / sizeof(drag_cursors[0]);
/* XPM */
-static char * drag_default_xpm[] = {
+static const char * drag_default_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
if (!drawing_area_type)
{
- GtkTypeInfo drawing_area_info =
+ static const GtkTypeInfo drawing_area_info =
{
"GtkDrawingArea",
sizeof (GtkDrawingArea),
if (!draw_window_type)
{
- GtkTypeInfo draw_window_info =
+ static const GtkTypeInfo draw_window_info =
{
"GtkDrawWindow",
sizeof (GtkDrawWindow),
if (!editable_type)
{
- GtkTypeInfo editable_info =
+ static const GtkTypeInfo editable_info =
{
"GtkEditable",
sizeof (GtkEditable),
static void
gtk_editable_init (GtkEditable *editable)
{
- static GtkTargetEntry targets[] = {
+ static const GtkTargetEntry targets[] = {
{ "STRING", TARGET_STRING },
{ "TEXT", TARGET_TEXT },
{ "COMPOUND_TEXT", TARGET_COMPOUND_TEXT }
};
- static gint n_targets = sizeof(targets) / sizeof(targets[0]);
+ static const gint n_targets = sizeof(targets) / sizeof(targets[0]);
GTK_WIDGET_SET_FLAGS (editable, GTK_CAN_FOCUS);
static GtkWidgetClass *parent_class = NULL;
static GdkAtom ctext_atom = GDK_NONE;
-static GtkTextFunction control_keys[26] =
+static const GtkTextFunction control_keys[26] =
{
(GtkTextFunction)gtk_move_beginning_of_line, /* a */
(GtkTextFunction)gtk_move_backward_character, /* b */
NULL, /* z */
};
-static GtkTextFunction alt_keys[26] =
+static const GtkTextFunction alt_keys[26] =
{
NULL, /* a */
(GtkTextFunction)gtk_move_backward_word, /* b */
if (!entry_type)
{
- GtkTypeInfo entry_info =
+ static const GtkTypeInfo entry_info =
{
"GtkEntry",
sizeof (GtkEntry),
if (!event_box_type)
{
- GtkTypeInfo event_box_info =
+ static const GtkTypeInfo event_box_info =
{
"GtkEventBox",
sizeof (GtkEventBox),
if (!file_selection_type)
{
- GtkTypeInfo filesel_info =
+ static const GtkTypeInfo filesel_info =
{
"GtkFileSelection",
sizeof (GtkFileSelection),
GtkWidget *pulldown_hbox;
GtkWidget *scrolled_win;
- char *dir_title [] = { "Directories", };
- char *file_title [] = { "Files", };
+ static const char *dir_title [] = { "Directories", NULL };
+ static const char *file_title [] = { "Files", NULL };
filesel->cmpl_state = cmpl_init_state ();
* expensive.
*/
- static struct {
+ static const struct {
gchar *name;
gboolean present;
struct stat statbuf;
} no_stat_dirs[] = {
{ "/afs", FALSE, { 0 } },
+ { "/net", FALSE, { 0 } }
};
- static gint n_no_stat_dirs = sizeof(no_stat_dirs) / sizeof(no_stat_dirs[0]);
+ static const gint n_no_stat_dirs = sizeof(no_stat_dirs) / sizeof(no_stat_dirs[0]);
static gboolean initialized = FALSE;
gint i;
if (!fixed_type)
{
- GtkTypeInfo fixed_info =
+ static const GtkTypeInfo fixed_info =
{
"GtkFixed",
sizeof (GtkFixed),
/* These are what we use as the standard font sizes, for the size clist.
Note that when using points we still show these integer point values but
we work internally in decipoints (and decipoint values can be typed in). */
-static guint16 font_sizes[] = {
+static const guint16 font_sizes[] = {
8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28,
32, 36, 40, 48, 56, 64, 72
};
} FontField;
/* These are the names of the fields, used on the info & filter page. */
-static gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = {
+static const gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = {
"Foundry:",
"Family:",
"Weight:",
/* This is used to look up a field in a fontname given one of the above
property indices. */
-static FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = {
+static const FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = {
XLFD_WEIGHT,
XLFD_SLANT,
XLFD_SET_WIDTH,
};
/* These are the positions of the properties in the filter table - x, y. */
-static gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = {
+static const gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = {
{ 1, 0 }, { 0, 2 }, { 1, 2 }, { 2, 2 }, { 2, 0 }, { 0, 0 }
};
-static gint filter_heights[GTK_NUM_FONT_PROPERTIES] = {
+static const gint filter_heights[GTK_NUM_FONT_PROPERTIES] = {
100, 70, 70, 40, 100, 100
};
if(!font_selection_type)
{
- GtkTypeInfo fontsel_type_info =
+ static const GtkTypeInfo fontsel_type_info =
{
"GtkFontSelection",
sizeof (GtkFontSelection),
if (!frame_type)
{
- GtkTypeInfo frame_info =
+ static const GtkTypeInfo frame_info =
{
"GtkFrame",
sizeof (GtkFrame),
NUM_XPMS
};
-static char *xpm[][27] =
+static const char *xpm[][27] =
{
/* spline: */
{
if (!gamma_curve_type)
{
- GtkTypeInfo gamma_curve_info =
+ static const GtkTypeInfo gamma_curve_info =
{
"GtkGammaCurve",
sizeof (GtkGammaCurve),
if (!handle_box_type)
{
- GtkTypeInfo handle_box_info =
+ static const GtkTypeInfo handle_box_info =
{
"GtkHandleBox",
sizeof (GtkHandleBox),
if (!hbutton_box_type)
{
- GtkTypeInfo hbutton_box_info =
+ static const GtkTypeInfo hbutton_box_info =
{
"GtkHButtonBox",
sizeof (GtkHButtonBox),
if (!hbox_type)
{
- GtkTypeInfo hbox_info =
+ static const GtkTypeInfo hbox_info =
{
"GtkHBox",
sizeof (GtkHBox),
if (!hpaned_type)
{
- GtkTypeInfo hpaned_info =
+ static const GtkTypeInfo hpaned_info =
{
"GtkHPaned",
sizeof (GtkHPaned),
if (!hruler_type)
{
- GtkTypeInfo hruler_info =
+ static const GtkTypeInfo hruler_info =
{
"GtkHRuler",
sizeof (GtkHRuler),
if (!hscale_type)
{
- GtkTypeInfo hscale_info =
+ static const GtkTypeInfo hscale_info =
{
"GtkHScale",
sizeof (GtkHScale),
if (!hscrollbar_type)
{
- GtkTypeInfo hscrollbar_info =
+ static const GtkTypeInfo hscrollbar_info =
{
"GtkHScrollbar",
sizeof (GtkHScrollbar),
if (!hseparator_type)
{
- GtkTypeInfo hseparator_info =
+ static const GtkTypeInfo hseparator_info =
{
"GtkHSeparator",
sizeof (GtkHSeparator),
if (!image_type)
{
- GtkTypeInfo image_info =
+ static const GtkTypeInfo image_info =
{
"GtkImage",
sizeof (GtkImage),
if (!input_dialog_type)
{
- GtkTypeInfo input_dialog_info =
+ static const GtkTypeInfo input_dialog_info =
{
"GtkInputDialog",
sizeof (GtkInputDialog),
static void
gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDeviceInfo *info)
{
- static char *axis_use_strings[GDK_AXIS_LAST] =
+ static const char *axis_use_strings[GDK_AXIS_LAST] =
{
"",
"X",
if (!invisible_type)
{
- GtkTypeInfo invisible_info =
+ static const GtkTypeInfo invisible_info =
{
"GtkInvisible",
sizeof (GtkInvisible),
if (!item_type)
{
- GtkTypeInfo item_info =
+ static const GtkTypeInfo item_info =
{
"GtkItem",
sizeof (GtkItem),
if (!item_factory_type)
{
- GtkTypeInfo item_factory_info =
+ static const GtkTypeInfo item_factory_info =
{
"GtkItemFactory",
sizeof (GtkItemFactory),
if (!label_type)
{
- GtkTypeInfo label_info =
+ static const GtkTypeInfo label_info =
{
"GtkLabel",
sizeof (GtkLabel),
if (!layout_type)
{
- GtkTypeInfo layout_info =
+ static const GtkTypeInfo layout_info =
{
"GtkLayout",
sizeof (GtkLayout),
if (!list_type)
{
- GtkTypeInfo list_info =
+ static const GtkTypeInfo list_info =
{
"GtkList",
sizeof (GtkList),
if (!list_item_type)
{
- GtkTypeInfo list_item_info =
+ static const GtkTypeInfo list_item_info =
{
"GtkListItem",
sizeof (GtkListItem),
guint gtk_debug_flags = 0; /* Global GTK debug flag */
#ifdef G_ENABLE_DEBUG
-static GDebugKey gtk_debug_keys[] = {
+static const GDebugKey gtk_debug_keys[] = {
{"objects", GTK_DEBUG_OBJECTS},
{"misc", GTK_DEBUG_MISC},
{"signals", GTK_DEBUG_SIGNALS},
if (!menu_type)
{
- GtkTypeInfo menu_info =
+ static const GtkTypeInfo menu_info =
{
"GtkMenu",
sizeof (GtkMenu),
if (!menu_bar_type)
{
- GtkTypeInfo menu_bar_info =
+ static const GtkTypeInfo menu_bar_info =
{
"GtkMenuBar",
sizeof (GtkMenuBar),
if (!menu_item_type)
{
- GtkTypeInfo menu_item_info =
+ static const GtkTypeInfo menu_item_info =
{
"GtkMenuItem",
sizeof (GtkMenuItem),
if (!menu_shell_type)
{
- GtkTypeInfo menu_shell_info =
+ static const GtkTypeInfo menu_shell_info =
{
"GtkMenuShell",
sizeof (GtkMenuShell),
if (!misc_type)
{
- GtkTypeInfo misc_info =
+ static const GtkTypeInfo misc_info =
{
"GtkMisc",
sizeof (GtkMisc),
if (!notebook_type)
{
- GtkTypeInfo notebook_info =
+ static const GtkTypeInfo notebook_info =
{
"GtkNotebook",
sizeof (GtkNotebook),
void
gtk_object_init_type (void)
{
- GtkType object_type = 0;
- GtkTypeInfo object_info =
+ static GtkType object_type = 0;
+ static const GtkTypeInfo object_info =
{
"GtkObject",
sizeof (GtkObject),
if (!option_menu_type)
{
- GtkTypeInfo option_menu_info =
+ static const GtkTypeInfo option_menu_info =
{
"GtkOptionMenu",
sizeof (GtkOptionMenu),
if (!packer_type)
{
- GtkTypeInfo packer_info =
+ static const GtkTypeInfo packer_info =
{
"GtkPacker",
sizeof (GtkPacker),
if (!paned_type)
{
- GtkTypeInfo paned_info =
+ static const GtkTypeInfo paned_info =
{
"GtkPaned",
sizeof (GtkPaned),
if (!pixmap_type)
{
- GtkTypeInfo pixmap_info =
+ static const GtkTypeInfo pixmap_info =
{
"GtkPixmap",
sizeof (GtkPixmap),
if (!plug_type)
{
- GtkTypeInfo plug_info =
+ static const GtkTypeInfo plug_info =
{
"GtkPlug",
sizeof (GtkPlug),
if (!preview_type)
{
- GtkTypeInfo preview_info =
+ static const GtkTypeInfo preview_info =
{
"GtkPreview",
sizeof (GtkPreview),
if (!progress_type)
{
- GtkTypeInfo progress_info =
+ static const GtkTypeInfo progress_info =
{
"GtkProgress",
sizeof (GtkProgress),
if (!progress_bar_type)
{
- GtkTypeInfo progress_bar_info =
+ static const GtkTypeInfo progress_bar_info =
{
"GtkProgressBar",
sizeof (GtkProgressBar),
if (!radio_button_type)
{
- GtkTypeInfo radio_button_info =
+ static const GtkTypeInfo radio_button_info =
{
"GtkRadioButton",
sizeof (GtkRadioButton),
if (!radio_menu_item_type)
{
- GtkTypeInfo radio_menu_item_info =
+ static const GtkTypeInfo radio_menu_item_info =
{
"GtkRadioMenuItem",
sizeof (GtkRadioMenuItem),
if (!range_type)
{
- GtkTypeInfo range_info =
+ static const GtkTypeInfo range_info =
{
"GtkRange",
sizeof (GtkRange),
static void gtk_rc_append_pixmap_path (gchar *dir);
-static GScannerConfig gtk_rc_scanner_config =
+static const GScannerConfig gtk_rc_scanner_config =
{
(
" \t\n"
FALSE /* scope_0_fallback */,
};
-static struct
+static const struct
{
gchar *name;
guint token;
{ "module_path", GTK_RC_TOKEN_MODULE_PATH },
};
-static guint n_symbols = sizeof (symbols) / sizeof (symbols[0]);
+static const guint n_symbols = sizeof (symbols) / sizeof (symbols[0]);
static GHashTable *rc_style_ht = NULL;
static GHashTable *realized_style_ht = NULL;
static GtkWidgetClass *parent_class;
-static GtkRulerMetric ruler_metrics[] =
+static const GtkRulerMetric ruler_metrics[] =
{
{"Pixels", "Pi", 1.0, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
{"Inches", "In", 72.0, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }},
if (!ruler_type)
{
- GtkTypeInfo ruler_info =
+ static const GtkTypeInfo ruler_info =
{
"GtkRuler",
sizeof (GtkRuler),
if (!scale_type)
{
- GtkTypeInfo scale_info =
+ static const GtkTypeInfo scale_info =
{
"GtkScale",
sizeof (GtkScale),
if (!scrollbar_type)
{
- GtkTypeInfo scrollbar_info =
+ static const GtkTypeInfo scrollbar_info =
{
"GtkScrollbar",
sizeof (GtkScrollbar),
if (!scrolled_window_type)
{
- GtkTypeInfo scrolled_window_info =
+ static const GtkTypeInfo scrolled_window_info =
{
"GtkScrolledWindow",
sizeof (GtkScrolledWindow),
if (!separator_type)
{
- GtkTypeInfo separator_info =
+ static const GtkTypeInfo separator_info =
{
"GtkSeparator",
sizeof (GtkSeparator),
if (!socket_type)
{
- GtkTypeInfo socket_info =
+ static const GtkTypeInfo socket_info =
{
"GtkSocket",
sizeof (GtkSocket),
if (!spin_button_type)
{
- GtkTypeInfo spin_button_info =
+ static const GtkTypeInfo spin_button_info =
{
"GtkSpinButton",
sizeof (GtkSpinButton),
if (!statusbar_type)
{
- GtkTypeInfo statusbar_info =
+ static const GtkTypeInfo statusbar_info =
{
"GtkStatusbar",
sizeof (GtkStatusbar),
static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s);
-GtkStyleClass default_class =
+static const GtkStyleClass default_class =
{
2,
2,
if (!table_type)
{
- GtkTypeInfo table_info =
+ static const GtkTypeInfo table_info =
{
"GtkTable",
sizeof (GtkTable),
if (!tearoff_menu_item_type)
{
- GtkTypeInfo tearoff_menu_item_info =
+ static const GtkTypeInfo tearoff_menu_item_info =
{
"GtkTearoffMenuItem",
sizeof (GtkTearoffMenuItem),
static GtkWidgetClass *parent_class = NULL;
-static GtkTextFunction control_keys[26] =
+static const GtkTextFunction control_keys[26] =
{
(GtkTextFunction)gtk_text_move_beginning_of_line, /* a */
(GtkTextFunction)gtk_text_move_backward_character, /* b */
NULL, /* z */
};
-static GtkTextFunction alt_keys[26] =
+static const GtkTextFunction alt_keys[26] =
{
NULL, /* a */
(GtkTextFunction)gtk_text_move_backward_word, /* b */
if (!text_type)
{
- GtkTypeInfo text_info =
+ static const GtkTypeInfo text_info =
{
"GtkText",
sizeof (GtkText),
if (!tips_query_type)
{
- GtkTypeInfo tips_query_info =
+ static const GtkTypeInfo tips_query_info =
{
"GtkTipsQuery",
sizeof (GtkTipsQuery),
if (!toggle_button_type)
{
- GtkTypeInfo toggle_button_info =
+ static const GtkTypeInfo toggle_button_info =
{
"GtkToggleButton",
sizeof (GtkToggleButton),
if (!toolbar_type)
{
- GtkTypeInfo toolbar_info =
+ static const GtkTypeInfo toolbar_info =
{
"GtkToolbar",
sizeof (GtkToolbar),
if (!tooltips_type)
{
- GtkTypeInfo tooltips_info =
+ static const GtkTypeInfo tooltips_info =
{
"GtkTooltips",
sizeof (GtkTooltips),
if (!tree_type)
{
- GtkTypeInfo tree_info =
+ static const GtkTypeInfo tree_info =
{
"GtkTree",
sizeof (GtkTree),
if (!tree_item_type)
{
- GtkTypeInfo tree_item_info =
+ static const GtkTypeInfo tree_item_info =
{
"GtkTreeItem",
sizeof (GtkTreeItem),
static GtkType
gtk_type_create (GtkType parent_type,
gchar *type_name,
- GtkTypeInfo *type_info)
+ const GtkTypeInfo *type_info)
{
GtkTypeNode *new_node;
GtkTypeNode *parent;
GtkType
gtk_type_unique (GtkType parent_type,
- GtkTypeInfo *type_info)
+ const GtkTypeInfo *type_info)
{
GtkType new_type;
gchar *type_name;
* gtk_type_unique is 1, which is GTK_TYPE_NONE. And so on.
*/
- struct {
+ static const struct {
GtkType type_id;
gchar *name;
} fundamental_info[] = {
{ GTK_TYPE_C_CALLBACK, "GtkCCallback" },
{ GTK_TYPE_FOREIGN, "GtkForeign" },
};
- struct {
+ static struct {
gchar *type_name;
GtkType *type_id;
GtkType parent;
void gtk_type_init (void);
-GtkType gtk_type_unique (GtkType parent_type,
- GtkTypeInfo *type_info);
+GtkType gtk_type_unique (GtkType parent_type,
+ const GtkTypeInfo *type_info);
void gtk_type_set_chunk_alloc (GtkType type,
guint n_chunks);
gchar* gtk_type_name (guint type);
if (!vbutton_box_type)
{
- GtkTypeInfo vbutton_box_info =
+ static const GtkTypeInfo vbutton_box_info =
{
"GtkVButtonBox",
sizeof (GtkVButtonBox),
if (!vbox_type)
{
- GtkTypeInfo vbox_info =
+ static const GtkTypeInfo vbox_info =
{
"GtkVBox",
sizeof (GtkVBox),
if (!viewport_type)
{
- GtkTypeInfo viewport_info =
+ static const GtkTypeInfo viewport_info =
{
"GtkViewport",
sizeof (GtkViewport),
if (!vpaned_type)
{
- GtkTypeInfo vpaned_info =
+ static const GtkTypeInfo vpaned_info =
{
"GtkVPaned",
sizeof (GtkVPaned),
if (!vruler_type)
{
- GtkTypeInfo vruler_info =
+ static const GtkTypeInfo vruler_info =
{
"GtkVRuler",
sizeof (GtkVRuler),
if (!vscale_type)
{
- GtkTypeInfo vscale_info =
+ static const GtkTypeInfo vscale_info =
{
"GtkVScale",
sizeof (GtkVScale),
if (!vscrollbar_type)
{
- GtkTypeInfo vscrollbar_info =
+ static const GtkTypeInfo vscrollbar_info =
{
"GtkVScrollbar",
sizeof (GtkVScrollbar),
if (!vseparator_type)
{
- GtkTypeInfo vseparator_info =
+ static const GtkTypeInfo vseparator_info =
{
"GtkVSeparator",
sizeof (GtkVSeparator),
if (!widget_type)
{
- GtkTypeInfo widget_info =
+ static const GtkTypeInfo widget_info =
{
"GtkWidget",
sizeof (GtkWidget),
if (!window_type)
{
- GtkTypeInfo window_info =
+ static const GtkTypeInfo window_info =
{
"GtkWindow",
sizeof (GtkWindow),
$valuename =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
$valuename = lc($valuename);
- print "static GtkEnumValue _${valuename}_values[] = {\n";
+ print "static const GtkEnumValue _${valuename}_values[] = {\n";
for (@entries) {
my ($name,$nick) = @{$_};
print qq( { $name, "$name", "$nick" },\n);